TreeGrid Paging Tutorial
3. Client column paging
Automatic paging of columns on client side
-
Client column paging distributes variable (middle) columns to pages.
The column paging is set by Cfg attribute ColPaging
='2'.
The column pages are rendered when the page becomes visible due scroll at least for time specified by Cfg attribute PageTime, default value is 200 ms.
-
The size of column page is set by Cfg attribute
ColPageLength
.
It is possible to always render the first few columns on start, their count is set by Cfg attribute ColPageMin
.
-
It is possible to render all columns on start, but with progress dialog to let users to cancel the rendering and render the rest of pages on demand.
For this behavior set ColPaging='1'. It can be switched also by (the second) Toolbar button Repaint, it calls action RenderPages.
Remember this grid has 1,000 columns and 150,000 cells, so rendering all pages on start takes some time.
-
If grid has rendered too many cells, it becomes slow. It is possible to automatically clear the unused column pages (the oldest, not displayed).
The maximal count of the rendered column pages is set by MaxColPages
.
-
If grid has many columns, it is strongly recommended to set their Width attribute to not slow the grid down by calculating their widths.
It is possible to preset the Width (like any other attribute) for all columns in default column: <Def><D Name='C' Width='xxx'/></Def>.
-
If grid contains a lot of cells, it is possible to set attribute Prepared='1' for all columns that do not need updating their cells to speed up the grid start.
The grid prepares the Date type cells set by string, the empty Int and Float cells with CanEmpty attribute, Select type and Calculated rows without CalcOrder set.
So for all other cases you can set the Prepared attribute to avoid iterating all cells on start and checking their type.